package com.ruoyi.project.chargesystem.controller;

import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.chargesystem.domain.CharMedReg;
import com.ruoyi.project.chargesystem.service.ICharMedRegService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/chargesystem/charge")
public class CharMedRegController extends BaseController {
    @Autowired
    private ICharMedRegService iCharMedRegService;

    @PreAuthorize("@ss.hasPermi('chargesystem:charge:list')")
    @GetMapping("/list")
    public TableDataInfo list(String regID){

        CharMedReg charMedReg = iCharMedRegService.selectCharMedRegInfo(regID);
        List<CharMedReg> list =new ArrayList<>();
        list.add(charMedReg);
        return getDataTable(list);
    }
}
